﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TbBstOnlineAskTransfer.aspx.cs" Inherits="XWG.JWBST.JWBSTManagementApp.Application.TbBstOnlineAskTransfer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>移交</title>
    <link href="../Styles/AddOrEditPage.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="../Styles/validationEngine.jquery.css" type="text/css"
        media="screen" charset="utf-8" />
    <script src="../Scripts/jQuery-1.9.0.js" type="text/javascript"></script>
    <script type="text/javascript" src="../Scripts/jquery.validationEngine-cn.js"></script>
    <script type="text/javascript" src="../Scripts/jquery.validationEngine.js"></script>
    <script type="text/javascript" src="../Scripts/CommonADEQ3.js"></script>
    <script src="../Scripts/thickbox.js" type="text/javascript"></script>
    <script type="text/javascript">
      
        $(document).ready(function () {
             var id = request("id");
            $.ajax({
                async: false,
                type: "post",
                data: { "id": id, "action": "05" },
                dataType: "json",
                url: "../AjaxServer/Application/TbBstOnlineAskHandler.ashx",
                success: function (data, textStatus) {
                    var form = document.forms["TbBstOnlineAskForm"];
                    //遍历指定form表单所有元素
                    for (var i = 0; i < form.length; i++) {
                        var fieldName = form[i].name;
                        var prefix = fieldName.substr(0, 3).toLocaleLowerCase();
                        switch (prefix) {
                            case "tex": $("[name='" + fieldName + "']").val(data[fieldName.substr(3)]); break;
                            case "sel": $("select[name='" + fieldName + "']").val(data[fieldName.substr(3)]); break;
                            case "rad": $("[name='" + fieldName + "'][value='" + data[fieldName.substr(3)] + "']").attr("checked", "checked"); break;
                            case "tet": $("textarea[name='" + fieldName + "']").val(data[fieldName.substr(3)]); break;
                            case "ddl": $("select[name='" + fieldName + "']").val(data[fieldName.substr(3)]); break;
                        }
                    }
                }
                 ,
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                    alert(textStatus);
                }
            });

            $("#Submit").bind("click", function () {
                $.ajax({
                    type: "post",
                    async: false,
                    data: { "id": id, "action": "TransferRecord", "Category": $("#selCategory").val() },
                    dataType: "json",
                    url: "../AjaxServer/Application/TbBstOnlineAskHandler.ashx",
                    success: function (message) {
                        if (message.ISSucceed != "undefined" && message.ISSucceed == false) {
                            alert(message.Message);
                            window.parent.tb_remove();
                            return false;
                        }
                        else {
                            window.parent.tb_remove();
                            window.parent.pageClick();
                        }

                    },
                    error: function (XMLHttpRequest, textStatus, errorThrown) {
                        //alert(errorThrown);
                    }
                });
            });
        });
    </script>
</head>
<body>
    <div class="container">
        <form id="TbBstOnlineAskForm" action="">
        <table class="mainTable">
            <tr>
                <td class="mainTable_TitleTd" colspan="4">
                    在线咨询移交
                </td>
            </tr>
            <tr>
                <td class="mainTable_LeftTd">
                    <label for="texName">
                        姓名：</label>
                </td>
                <td class="mainTable_RightTd">
                    <input id="texName" name="texName" class="validate[required]" type="text" size="30"
                        value="" maxlength="20" disabled="disabled"/><em>*</em>
                </td>
                <td class="mainTable_LeftTd">
                    <label for="texPhone">
                        流水号：</label>
                </td>
                <td class="mainTable_RightTd">
                    <input id="texLsh" name="texLsh" type="text" size="30" value="" disabled="disabled" />
                </td>
            </tr>
            <tr>
                <td class="mainTable_LeftTd">
                    <label for="texName">
                        警种类别：</label>
                </td>
                <td class="mainTable_RightTd">
                    <select id="selCategory" name="selCategory" runat="server" style="width: 214px" class="validate[required]">
                        <option value="">请选择警种</option>
                    </select><em>*</em>
                </td>
               <td class="mainTable_LeftTd">
                    <label for="texPhone">
                        手机号：</label>
                </td>
                <td class="mainTable_RightTd">
                    <input id="Text1" name="texPhone" type="text" size="30" value="" disabled="disabled" />
                </td>
            </tr>
            <tr>
                <td class="mainTable_LeftTd">
                    <label for="texContent">
                        咨询内容：</label>
                </td>
                <td class="mainTable_RightTd" colspan="3">
                    <%-- <asp:TextBox ID="texContent" runat="server" Width="93%" TextMode="MultiLine" MaxLength="200"
                        Height="60px" onKeyDown="checkMaxInput(this,200)" onKeyUp="checkMaxInput(this,200)"></asp:TextBox><em>*</em>--%>
                    <textarea id="texContent" cols="2" rows="2" class="validate[required]" runat="server"
                        style="width: 591px; height: 60px" onkeydown="checkMaxInput(this,500)" disabled="disabled" onkeyup="checkMaxInput(this,500)"></textarea><em>*</em>
                </td>
            </tr>
            <%--<tr>
                <td class="style2" align="left" colspan="4">
                    <label for="texReplyname">
                        <span class="style1"><strong>回复信息</strong></span></label><b> </b>
                </td>
            </tr>
            <tr>
                <td class="mainTable_LeftTd">
                    <label for="texReplycontent">
                        回复内容：</label>
                </td>
                <td class="mainTable_RightTd" colspan="3">
                    <asp:TextBox ID="texReplycontent" runat="server" Width="93%" TextMode="MultiLine"
                        MaxLength="200" Height="60px" onKeyDown="checkMaxInput(this,200)" onKeyUp="checkMaxInput(this,200)"></asp:TextBox>
                </td>
            </tr>--%>
            <tr>
                <td class="mainTable_ButtonTd" colspan="4">
                    <input id="Submit" class="button" type="button" value="提交" />
                    <input class="button" type="button" value="取消" onclick="window.parent.tb_remove();" />
                </td>
            </tr>
        </table>
        </form>
    </div>
</body>
</html>
